package com.clz.hyperit.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Generated;
import org.hibernate.annotations.GenerationTime;

import com.clz.hyperit.util.IdAnnotationin;
import com.fasterxml.jackson.annotation.JsonInclude;

@JsonInclude(JsonInclude.Include.NON_NULL)
@Entity
@Table(name = "comment", catalog = "hyperit")
public class Comment {

	@IdAnnotationin
	private Integer id;
	private Integer userDetail_id;
	private String content;
	private String createtime;
	private Integer type;  //0：文章 1：手记 2：留言 3：私信
	private Integer target_id;
	
	public Comment() {
		
	}
	
	public Comment(Integer id, String createtime) {
	
		this.id = id;
		this.createtime = createtime;
	}

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	@Column(name = "userdetail_id")
	public Integer getUserDetail_id() {
		return userDetail_id;
	}
	public void setUserDetail_id(Integer userDetail_id) {
		this.userDetail_id = userDetail_id;
	}
	@Column(name = "content")
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	@Generated(GenerationTime.INSERT)
	@Column(name = "createtime")
	public String getCreatetime() {
		return createtime;
	}
	public void setCreatetime(String createtime) {
		this.createtime = createtime;
	}
	@Column(name = "type")
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	@Column(name = "target_id")
	public Integer getTarget_id() {
		return target_id;
	}

	public void setTarget_id(Integer target_id) {
		this.target_id = target_id;
	}

	@Override
	public String toString() {
		return "Comment [id=" + id + ", userDetail_id=" + userDetail_id
				+ ", content=" + content + ", createtime=" + createtime
				+ ", type=" + type + ", target_id=" + target_id + "]";
	}

	

	
}
